﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BL.Entities;
namespace zCO
{
    public partial class frmEditObraSocial : Form
    {
        public frmEditObraSocial()
        {
            InitializeComponent();
        }

        private void frmEditObraSocial_Load(object sender, EventArgs e)
        {
            dgvObrasSociales.DataSource = ColeccionObrasSociales.FindAll();
        }

        private void dgvObrasSociales_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
          
        }

        private void dgvObrasSociales_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
          
        }

        private void dgvObrasSociales_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (ColeccionObrasSociales.Current.GetByNombre(dgvObrasSociales[0, e.RowIndex].Value.ToString()) != null)
            {

                frmABMObraSocial frm = new frmABMObraSocial(ColeccionObrasSociales.Current.GetByNombre(dgvObrasSociales[0, e.RowIndex].Value.ToString()));
                frm.Show();
            }
        }


    }
}
